package com.xunyin.modules.redisqueue;

import org.springframework.stereotype.Service;

@Service
public class RedisSqueueService {

    private final MessagePublisher messagePublisher;

    public RedisSqueueService(MessagePublisher messagePublisher) {
        this.messagePublisher = messagePublisher;
    }

    public void doSomethingAndPublishMessage(PublishMessage publishMessage) {

        // 执行一些操作
        // String message = uid.toString();
        messagePublisher.publishMessage(publishMessage);

    }

}
